import {lifecycleMixin , mountComponent} from '../lifecycle/lifecycle';
export default class obServer {
  constructor(data,vm) {
    
    const defineReactive = function(obj, key, value) {
      Object.defineProperty(vm, key, {
        enumerable: true,
        configurable: true,
        get() {
          return value;
        },
        set:(newVal) =>{
          if(value ===newVal)return
          value = newVal;
          console.log("set")
          mountComponent(vm);
        }
      })
    }
    Object.keys(data).forEach(function (key) {
      defineReactive(data, key, data[key])
    })
  }
}


// with(this){

//   return 
  
//     _c('div',{}
      
      
//       ,_c('p',undefined
      
      
//       ,_v(_s(sige))),_c('p',undefined
      
      
//       ,_v(_s(asd))),_c('button',{on:{"click":"clickFn"},style:{"width":"100px","height":"30px"}}
      
      
//       ),_c('input',{on:{"input":function($event){asd=$event.target.value}},value:_s(asd)}
      
      
//       ))
// }
  